package com.gxa.mapper.shezhimapper;

import com.gxa.pojo.GongYingShang;
import com.gxa.pojo.GongYingShangType;
import com.gxa.pojo.KeHu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author weishen
 */
@Mapper
public interface GongYingShangMapper {

    List<GongYingShang> selectAllGongYingShang();
    int selectCountGongYingShang();
    List<GongYingShang> selectAllGongYingShangForPage(@Param("index") int index, @Param("size") int size);

    List<GongYingShangType> selectAllGongYingShangType();

    int selectCountAnyGongYingShang(@Param("gongYingShangType")
                                            String gongYingShangType,
                                    @Param("gongYingShangNumber")
                                            String gongYingShangNumber,
                                    @Param("gongYingShangMingCheng")
                                            String gongYingShangMingCheng,
                                    @Param("lianXiRen")
                                            String lianXiRen,
                                    @Param("phone")
                                            String phone);

    List<GongYingShang> selectGongYingShangByTypeOrBianHaoOrLianXiRenOrMingChenOrPhone(@Param("index")int index,
                                                                              @Param("size")int size,
                                                                              @Param("gongYingShangType")
                                                                                      String gongYingShangType,
                                                                              @Param("gongYingShangNumber")
                                                                                      String gongYingShangNumber,
                                                                                       @Param("gongYingShangMingCheng")
                                                                                       String gongYingShangMingCheng,
                                                                              @Param("lianXiRen")
                                                                                        String lianXiRen,
                                                                              @Param("phone")
                                                                                        String phone);
    int insertGongYingShang(GongYingShang gongYingSHang);

    int updateGongYingShangById(GongYingShang gongYingShang);

    int deleteGongYingShangById(int id);
}
